package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2018/10/16 0016.
 */

public class UnitResult  {

    /**
     * code : 200
     * msg : 统计结果成功！
     * data : {"results":[{"num":"1","user":2152,"AnswerRight":1819,"CorrectRate":84.53,"UserAnswer":"红色","row":"正确","analysis":3389},{"num":"2","user":2152,"AnswerRight":1316,"CorrectRate":61.15,"UserAnswer":"5","row":"错误","analysis":3390},{"num":"3","user":2152,"AnswerRight":1784,"CorrectRate":82.9,"UserAnswer":"8","row":"正确","analysis":3391},{"num":"4","user":2160,"AnswerRight":1892,"CorrectRate":87.59,"UserAnswer":"3","row":"正确","analysis":3338},{"num":"5","user":2160,"AnswerRight":1998,"CorrectRate":92.5,"UserAnswer":"A","row":"正确","analysis":3321},{"num":"6","user":2161,"AnswerRight":2015,"CorrectRate":93.24,"UserAnswer":"C","row":"正确","analysis":3024},{"num":"7","user":2169,"AnswerRight":1286,"CorrectRate":59.29,"UserAnswer":"B,C,","row":"错误","analysis":3025},{"num":"8","user":2163,"AnswerRight":1697,"CorrectRate":78.46,"UserAnswer":"8","row":"正确","analysis":3026},{"num":"9","user":2163,"AnswerRight":1937,"CorrectRate":89.55,"UserAnswer":"B,C,","row":"错误","analysis":3027},{"num":"10","user":2155,"AnswerRight":1109,"CorrectRate":51.46,"UserAnswer":"3","row":"错误","analysis":3028}],"page_info":{"num":10,"average":10,"total_score":60,"exlistid":319,"exinfo":422,"examine_title":"摸彩球测试卷","examination_title":"摸彩球测试卷","first_score":0},"score_statistics":[{"group_name":"100分","score":24.69,"color":"#D19275"},{"group_name":"90分","score":23.22,"color":"#E47833"},{"group_name":"80分","score":18.67,"color":"#5F9F9F"},{"group_name":"70分","score":10.88,"color":"#93DB70"},{"group_name":"60分","score":8.21,"color":"#4A766E"},{"group_name":"50分","score":5.75,"color":"#4F4F2F"},{"group_name":"40分","score":3.14,"color":"#856363"},{"group_name":"30分","score":1.2,"color":"#23238E"},{"group_name":"20分","score":0.78,"color":"#000000"},{"group_name":"10分","score":1.67,"color":"#70DB93"},{"group_name":"0分","score":1.78,"color":"#9F5F9F"}]}
     */

    private int code;
    private String msg;
    private DataBean data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * results : [{"num":"1","user":2152,"AnswerRight":1819,"CorrectRate":84.53,"UserAnswer":"红色","row":"正确","analysis":3389},{"num":"2","user":2152,"AnswerRight":1316,"CorrectRate":61.15,"UserAnswer":"5","row":"错误","analysis":3390},{"num":"3","user":2152,"AnswerRight":1784,"CorrectRate":82.9,"UserAnswer":"8","row":"正确","analysis":3391},{"num":"4","user":2160,"AnswerRight":1892,"CorrectRate":87.59,"UserAnswer":"3","row":"正确","analysis":3338},{"num":"5","user":2160,"AnswerRight":1998,"CorrectRate":92.5,"UserAnswer":"A","row":"正确","analysis":3321},{"num":"6","user":2161,"AnswerRight":2015,"CorrectRate":93.24,"UserAnswer":"C","row":"正确","analysis":3024},{"num":"7","user":2169,"AnswerRight":1286,"CorrectRate":59.29,"UserAnswer":"B,C,","row":"错误","analysis":3025},{"num":"8","user":2163,"AnswerRight":1697,"CorrectRate":78.46,"UserAnswer":"8","row":"正确","analysis":3026},{"num":"9","user":2163,"AnswerRight":1937,"CorrectRate":89.55,"UserAnswer":"B,C,","row":"错误","analysis":3027},{"num":"10","user":2155,"AnswerRight":1109,"CorrectRate":51.46,"UserAnswer":"3","row":"错误","analysis":3028}]
         * page_info : {"num":10,"average":10,"total_score":60,"exlistid":319,"exinfo":422,"examine_title":"摸彩球测试卷","examination_title":"摸彩球测试卷","first_score":0}
         * score_statistics : [{"group_name":"100分","score":24.69,"color":"#D19275"},{"group_name":"90分","score":23.22,"color":"#E47833"},{"group_name":"80分","score":18.67,"color":"#5F9F9F"},{"group_name":"70分","score":10.88,"color":"#93DB70"},{"group_name":"60分","score":8.21,"color":"#4A766E"},{"group_name":"50分","score":5.75,"color":"#4F4F2F"},{"group_name":"40分","score":3.14,"color":"#856363"},{"group_name":"30分","score":1.2,"color":"#23238E"},{"group_name":"20分","score":0.78,"color":"#000000"},{"group_name":"10分","score":1.67,"color":"#70DB93"},{"group_name":"0分","score":1.78,"color":"#9F5F9F"}]
         */

        private PageInfoBean page_info;
        private List<ResultsBean> results;
        private List<ScoreStatisticsBean> score_statistics;

        public PageInfoBean getPage_info() {
            return page_info;
        }

        public void setPage_info(PageInfoBean page_info) {
            this.page_info = page_info;
        }

        public List<ResultsBean> getResults() {
            return results;
        }

        public void setResults(List<ResultsBean> results) {
            this.results = results;
        }

        public List<ScoreStatisticsBean> getScore_statistics() {
            return score_statistics;
        }

        public void setScore_statistics(List<ScoreStatisticsBean> score_statistics) {
            this.score_statistics = score_statistics;
        }

        public static class PageInfoBean {
            /**
             * num : 10
             * average : 10
             * total_score : 60
             * exlistid : 319
             * exinfo : 422
             * examine_title : 摸彩球测试卷
             * examination_title : 摸彩球测试卷
             * first_score : 0
             */

            private int num;
            private int average;
            private int total_score;
            private int exlistid;
            private int exinfo;
            private String examine_title;
            private String examination_title;
            private int first_score;

            public int getNum() {
                return num;
            }

            public void setNum(int num) {
                this.num = num;
            }

            public int getAverage() {
                return average;
            }

            public void setAverage(int average) {
                this.average = average;
            }

            public int getTotal_score() {
                return total_score;
            }

            public void setTotal_score(int total_score) {
                this.total_score = total_score;
            }

            public int getExlistid() {
                return exlistid;
            }

            public void setExlistid(int exlistid) {
                this.exlistid = exlistid;
            }

            public int getExinfo() {
                return exinfo;
            }

            public void setExinfo(int exinfo) {
                this.exinfo = exinfo;
            }

            public String getExamine_title() {
                return examine_title;
            }

            public void setExamine_title(String examine_title) {
                this.examine_title = examine_title;
            }

            public String getExamination_title() {
                return examination_title;
            }

            public void setExamination_title(String examination_title) {
                this.examination_title = examination_title;
            }

            public int getFirst_score() {
                return first_score;
            }

            public void setFirst_score(int first_score) {
                this.first_score = first_score;
            }
        }

        public static class ResultsBean implements Parcelable {
            /**
             * num : 1
             * user : 2152
             * AnswerRight : 1819
             * CorrectRate : 84.53
             * UserAnswer : 红色
             * row : 正确
             * analysis : 3389
             */

            private String num;
            private int user;
            private int AnswerRight;
            private double CorrectRate;
            private String UserAnswer;
            private String row;
            private int analysis;

            public ResultsBean(String num, int user, int answerRight, double correctRate, String userAnswer, String row, int analysis) {
                this.num = num;
                this.user = user;
                AnswerRight = answerRight;
                CorrectRate = correctRate;
                UserAnswer = userAnswer;
                this.row = row;
                this.analysis = analysis;
            }

            protected ResultsBean(Parcel in) {
                num = in.readString();
                user = in.readInt();
                AnswerRight = in.readInt();
                CorrectRate = in.readDouble();
                UserAnswer = in.readString();
                row = in.readString();
                analysis = in.readInt();
            }

            public static final Creator<ResultsBean> CREATOR = new Creator<ResultsBean>() {
                @Override
                public ResultsBean createFromParcel(Parcel in) {
                    return new ResultsBean(in);
                }

                @Override
                public ResultsBean[] newArray(int size) {
                    return new ResultsBean[size];
                }
            };

            public String getNum() {
                return num;
            }

            public void setNum(String num) {
                this.num = num;
            }

            public int getUser() {
                return user;
            }

            public void setUser(int user) {
                this.user = user;
            }

            public int getAnswerRight() {
                return AnswerRight;
            }

            public void setAnswerRight(int AnswerRight) {
                this.AnswerRight = AnswerRight;
            }

            public double getCorrectRate() {
                return CorrectRate;
            }

            public void setCorrectRate(double CorrectRate) {
                this.CorrectRate = CorrectRate;
            }

            public String getUserAnswer() {
                return UserAnswer;
            }

            public void setUserAnswer(String UserAnswer) {
                this.UserAnswer = UserAnswer;
            }

            public String getRow() {
                return row;
            }

            public void setRow(String row) {
                this.row = row;
            }

            public int getAnalysis() {
                return analysis;
            }

            public void setAnalysis(int analysis) {
                this.analysis = analysis;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(num);
                dest.writeInt(user);
                dest.writeInt(AnswerRight);
                dest.writeDouble(CorrectRate);
                dest.writeString(UserAnswer);
                dest.writeString(row);
                dest.writeInt(analysis);
            }
        }

        public static class ScoreStatisticsBean implements Parcelable {
            /**
             * group_name : 100分
             * score : 24.69
             * color : #D19275
             */

            private String group_name;
            private double score;
            private String color;

            public ScoreStatisticsBean(String group_name, double score, String color) {
                this.group_name = group_name;
                this.score = score;
                this.color = color;
            }

            protected ScoreStatisticsBean(Parcel in) {
                group_name = in.readString();
                score = in.readDouble();
                color = in.readString();
            }

            public static final Creator<ScoreStatisticsBean> CREATOR = new Creator<ScoreStatisticsBean>() {
                @Override
                public ScoreStatisticsBean createFromParcel(Parcel in) {
                    return new ScoreStatisticsBean(in);
                }

                @Override
                public ScoreStatisticsBean[] newArray(int size) {
                    return new ScoreStatisticsBean[size];
                }
            };

            public String getGroup_name() {
                return group_name;
            }

            public void setGroup_name(String group_name) {
                this.group_name = group_name;
            }

            public double getScore() {
                return score;
            }

            public void setScore(double score) {
                this.score = score;
            }

            public String getColor() {
                return color;
            }

            public void setColor(String color) {
                this.color = color;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(group_name);
                dest.writeDouble(score);
                dest.writeString(color);
            }
        }
    }
}
